#pragma once
#include <string>

class Stock20
{

private:
	std::string company;
	int shares;
	double share_val;
	double total_val;
	void set_tot() { total_val = shares * share_val; }


public:
	Stock20();
	Stock20(const std::string& co, int n = 0, double pr = 0.0);
	~Stock20();
	void buy(int num, double price);
	void sell(int num, double price);
	void update(double price);
	void show(void) const;
	const Stock20 & topval(const Stock20& s) const;
};